<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%logs}}".
 *
 * @property string $id id
 * @property int $user_id 会员id
 * @property string $log_url 链接
 * @property string $log_info 信息
 * @property string $log_ip 操作ip
 * @property int $created_at 创建时间
 * @property int $updated_at 更新时间
 * @property int $deleted 标记删除
 */
class Logs extends \common\models\BaseModel
{
  public $a = 'logs';
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%logs}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['user_id', 'created_at', 'updated_at', 'deleted'], 'integer'],
            [['log_url', 'user_id', 'log_ip'], 'required'],
            [['log_info'], 'string'],
            [['log_url'], 'string', 'max' => 1000],
            [['log_ip'], 'string', 'max' => 50],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'id',
            'user_id' => '会员id',
            'log_url' => '链接',
            'log_info' => '信息',
            'log_ip' => '操作ip',
            'created_at' => '创建时间',
            'updated_at' => '更新时间',
            'deleted' => '标记删除',
        ];
    }
}
